<?php

namespace App\Exception;

use Hyperf\Server\Exception\ServerException;
use Throwable;

/**
 * 自定义异常类
 *
 * @author WangBin
 */
class BusinessException extends ServerException
{
    public static function error(int $code, string $message)
    {
        throw new BusinessException($message, $code);
    }
}